Skip to content

feat(http-client-python): add mock API tests for reserved operation body param names#10534

Closed
msyyc with Copilot wants to merge 3 commits into
mainfrom
copilot/add-test-case-for-pull-10529
Closed

feat(http-client-python): add mock API tests for reserved operation body param names#10534
msyyc with Copilot wants to merge 3 commits into
mainfrom
copilot/add-test-case-for-pull-10529

Conversation

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Adds Python SDK mock API test coverage for the SpecialWords_ReservedOperationBodyParams_withItems scenario — verifying that an operation parameter named items (a Python Mapping protocol method) is serialized as "items" on the wire, not mangled to "items_property".

Changes

  • package.json: Sets @typespec/http-specs to the stable 0.1.0-alpha.37, which contains the new scenario (aligned with main after a merge)
  • mock_api/azure/test_special_words.py + mock_api/unbranded/test_special_words.py: Adds test_reserved_operation_body_params_with_items (sync)
  • mock_api/azure/asynctests/test_special_words_async.py + mock_api/unbranded/asynctests/test_special_words_async.py: Adds async counterpart
def test_reserved_operation_body_params_with_items(client: SpecialWordsClient):
    client.reserved_operation_body_params.with_items(items=["item"])

The mock expects POST /special-words/operations/body-param-reserved with body {"items": ["item"]} → 204.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Apr 28, 2026
Copilot AI changed the title [WIP] Add test case for pull request 10529 feat(http-client-python): add mock API tests for reserved operation body param names Apr 28, 2026
Copilot AI requested a review from msyyc April 28, 2026 23:13
@microsoft-github-policy-service microsoft-github-policy-service Bot added the stale Mark a PR that hasn't been recently updated and will be closed. label May 29, 2026
@msyyc
msyyc marked this pull request as ready for review June 10, 2026 05:43
@msyyc

msyyc commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

…-for-pull-10529

# Conflicts:
#	packages/http-client-python/package-lock.json
#	packages/http-client-python/package.json

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts in package.json and package-lock.json by merging the latest origin/main. Took main's dependency versions (the ~0.82.0 bumps and the stable @typespec/http-specs@0.1.0-alpha.37, which I verified still contains the ReservedOperationBodyParams scenario). The test files and changelog entry are intact, and the resulting diff vs. main is only the 4 new test additions plus the changelog.

Copilot finished work on behalf of msyyc June 10, 2026 05:48
@msyyc

msyyc commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

move to #10944

@msyyc msyyc closed this Jun 10, 2026
@msyyc
msyyc deleted the copilot/add-test-case-for-pull-10529 branch June 10, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python stale Mark a PR that hasn't been recently updated and will be closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for https://github.com/microsoft/typespec/pull/10529

2 participants